document.addEventListener('DOMContentLoaded', () => {
  hljs.configure({ cssSelector: '.corepress-code-pre code', ignoreUnescapedHTML: true });
  hljs.highlightAll();
  $('.corepress-code-pre').append('<div class="code-bar"><i class="fal fa-clone code-bar-btn-copy-fonticon" title="复制"></i></div>');
  $('.corepress-code-pre code').each(function () {
    $(this).html('<ol class="hijs-line-number"><li>' + $(this).html().replace(/\n/g, '\n</li><li>') + '\n</li></ol>');
  });
});